<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
	<head>
		<title>申请结果</title>
		<link rel="stylesheet" href="${ctx }/scripts/plugins/tab/ui.tabs.css" type="text/css" media="print, projection, screen">
		<script src="${ctx }/scripts/plugins/tab/ui.core.js" type="text/javascript"></script>
        <script src="${ctx }/scripts/plugins/tab/ui.tabs.js" type="text/javascript"></script>
		<link rel="stylesheet" type="text/css" href="${ctx }/styles/displaytag.css" />
		<script type="text/javascript">
			function SetCwinHeight(obj){
				var iframe = obj;
			  	if (document.getElementById){
			   		if (iframe && !window.opera){
			    		if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight){
			    			iframe.height = iframe.contentDocument.body.offsetHeight + 10;
			    		}else if(iframe.Document && iframe.Document.body.scrollHeight){
			    			iframe.height = iframe.Document.body.scrollHeight + 30;
			    		}
			   		}
				}
			}
			
			function editApplyResult(id){
				art.dialog.open(
					ctx + "/initEditApplyResult.html?id=" + id, {
						title: "修改申请结果",
						width:"500px", 
						height:"200px",
						lock: true
					}
				);
			}
			
			$(function() {
                $('#rotate > ul').tabs({ fx: { opacity: 'toggle' } });
            });
		</script>
	</head>
	<body>
		<div class="container_16">
			<div class="grid_16">
				<div class="content_top">
					<span>申请结果</span>
					<a href="${ctx }/initVipServiceInfo.html?id=${param.vipServiceId }" style="float: right;padding: 6px;"><input type="button" class="button" value="返回VIP专案主页"></a>
				</div>
				<div class="content_bottom">
					<div style="padding: 30px;">
						<table cellpadding="0" cellspacing="0" class="service_table">
							<tr>
								<th class="left">
									VIP服务专案号：${vipService.vipServiceId }
								</th>
								<th class="right">
									服务时间：<fmt:formatDate value="${vipService.startTime }" pattern="yyyy-MM-dd"/>&nbsp;&nbsp;至&nbsp;&nbsp;<fmt:formatDate value="${vipService.endTime }" pattern="yyyy-MM-dd"/>
								</th>
							</tr>
							<tr>
								<td colspan="2">
									<iframe id="userInfoIframe" name="userInfoIframe" onload="Javascript:SetCwinHeight(this)" src="${ctx }/doshowInfo.html?vipServiceId=${param.vipServiceId }" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
								</td>
							</tr>
						</table>
						<display:table id="sc" name="pageBean" pagesize="10" class="display_table" requestURI="" style="border-collapse: collapse;border-spacing: 0;">
							<display:column title="序号" value="${(pageBean.pageNumber - 1) * pageBean.objectsPerPage + sc_rowNum }" style="width: 5%"/>
						 	<display:column title="学校名称" property="material.school.name" style="width: 35%"/> 	
						 	<display:column title="申请专业" property="material.applyMajor.name" style="width: ${'ROLE_USER' ne currentRole.name ? '30' : '35'}%"/>
						    <display:column title="申请结果"  style="width: ${'ROLE_USER' ne currentRole.name ? '15' : '25'}%">
						   	 	<c:choose>
						   	 		<c:when test="${sc.material.status eq 0 }">
						   	 			<font color="blue">申请中</font>
						   	 		</c:when>
						   	 		<c:when test="${sc.material.status eq 1 }">
						   	 			<font color="green">录取</font>
						   	 		</c:when>
						   	 		<c:when test="${sc.material.status eq 2 }">
						   	 			<font color="red">拒信</font>
						   	 		</c:when>
						   	 	</c:choose>
						    </display:column>
						    <c:if test="${'ROLE_USER' ne currentRole.name}">
							 	<display:column title="操作" style="width: 15%">
							 		<a href="javascript:void(0)" onclick="editApplyResult(${sc.material.id})">编辑</a>
							 	</display:column>
						    </c:if>  	
						</display:table>
						<div id="rotate">
							<ul>
								<li>
									<a href="#comment">
										<span>留言交互</span>
									</a>
								</li>
							</ul>
							<div id="comment">
								<iframe id="commentIframe" name="commentIframe" onload="Javascript:SetCwinHeight(this)" src="${ctx }/commentList.html?ownerId=${vipService.id}&ownerType=8" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
							</div>
						</div>
					</div>
				</div>
			</div>			
		</div>
	</body>
</html>		